//
//  UIViewController+UIView.swift
//  OnemeetingDemo
//
//  Created by 张衡 on 2020/4/17.
//  Copyright © 2020 www.onemeeting.1meetingIos. All rights reserved.
//

import Foundation


extension NSView {
    func jk_viewController() -> NSViewController? {
        var next = self.nextResponder
        while (next != nil) {
            if (next?.isKind(of: NSViewController.classForCoder())) == true {
                return next as? NSViewController
            }
            next = next?.nextResponder
        }
        return nil
    }
}
